package com.apps.goods.model.po;

import com.apps.sannotation.constraints.NumDef;
import com.apps.sannotation.constraints.StrDef;
import com.apps.sannotation.identity.GmtCreate;
import com.apps.sannotation.identity.GmtModify;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 大鹏
 * @since 2020-10-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("kupa_goods_cat")
public class KupaGoodsCat implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父节点,也是本表的记录,父节点为0代表是根分类
     */
    private Integer father_id;

    /**
     * 分类名字
     */
    private String name;

    @NumDef(value = 0,Cla = BigDecimal.class)
    private BigDecimal price;
    /**
     * 分类的深度,代表这个分类上面有多少个父分类
     */
    private Integer deep;

    /**
     * 父节点的ID数组,字符串形式存储.
     */
    private String father_tree;
    /**
     * 父节点的树名称
     */
    private String father_name_tree;

    @GmtCreate
    private LocalDateTime gmt_create;
    @GmtModify
    private LocalDateTime gmt_modify;
    @StrDef("")
    private String remark;


    public static final String ID = "id";

    public static final String FATHER_ID = "father_id";

    public static final String NAME = "name";

    public static final String DEEP = "deep";

    public static final String FATHER_TREE = "father_tree";

    public static final String GMT_CREATE = "gmt_create";

    public static final String GMT_MODIFY = "gmt_modify";

    public static final String REMARK = "remark";

}
